import http from "@/utils/http/index";

// 密码登录
export const login = (data: any) => {
  return http<any>({
    method: "POST",
    url: `/bjp/api.loginBusin/in`,
    data,
  });
};
/**
 * 用户手机号验证码登录
 * @param data object 用户手机号 也只能
 */
export const codeLogin = (data: any) => {
  return http<any>({
    method: "POST",
    url: `/bjp/api.loginBusin/codeLogin`,
    data,
  });
};
/**
 * 注册
 * @param data object 账号密码验证码
 */
export const register = (data: any) => {
  return http<any>({
    method: "POST",
    url: `/bjp/api.loginBusin/register`,
    data,
  });
};
/**
 *  手机号修改密码
 * @param data object 用户手机号 也只能
 */
export const codeModifyPassword = (data: any) => {
  return http<any>({
    method: "POST",
    url: `/bjp/api.loginBusin/codeModifyPassword`,
    data,
  });
};
// 获取用户信息
export const getUserInfo = () => {
  return http<any>({
    method: "GET",
    url: `/bjp/api.auth.businessMy/get`,
  });
};
// 获取用户信息无需登录
export const getNoAuthInfo = (data: any) => {
  return http<any>({
    method: "GET",
    url: `/bjp/api.auth.businessMy/getNoAuthInfo`,
    data,
  });
};
// 修改用户信息
export const getSave = (data: any) => {
  return http<any>({
    method: "POST",
    url: `/bjp/api.auth.businessMy/getSave`,
    data,
  });
};
/**
 * 发送验证码
 */
export const sendsms = (data: any) => {
  return http<any>({
    method: "GET",
    url: `/bjp/api.loginBusin/sendsms`,
    data,
  });
};
/**
 * 到价提醒开关
 */
export const setRemind = (data: any) => {
  return http<any>({
    method: "POST",
    url: `/bjp/api.auth.businessMy/setRemind`,
    data,
  });
};
/**
 * 获取授权链接
 */
export const getCurlOauth = (data: any) => {
  return http<any>({
    method: "GET",
    url: `/bjp/api.wechat/getAuthUrl`,
    data,
  });
};
/**
 * 授权登录Code换取openid
 */
export const getOpenidByCode = (data: any) => {
  return http<any>({
    method: "POST",
    url: `/bjp/api.wechat/getOpenidByCode`,
    data,
  });
};
/**
 * 行情管理列表
 */
export const getList = (data?: any) => {
  return http<any>({
    method: "POST",
    url: `/bjp/api.auth.market/getList`,
    data,
  });
};
/**
 * 我的行情显示隐藏
 */
export const setMarketype = (data?: any) => {
  return http<any>({
    method: "POST",
    url: `/bjp/api.auth.businessMy/setMarketype`,
    data,
  });
};
/**
 * 查询用户是否关注
 */
export const getWechatFollow = (data?: any) => {
  return http<any>({
    method: "POST",
    url: `/bjp/api.auth.reminder/getWechatFollow`,
    data,
  });
};
